package com.muyu.payment.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.payment.domain.PaymentIndent;
import com.muyu.payment.domain.model.PaymentIndentPageQueryModel;
import com.muyu.payment.domain.model.PaymentIndentQueryModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 支付订单Mapper接口
 *
 * @author muyu
 * @date 2025-09-18
 */
@Mapper
public interface PaymentIndentMapper extends BaseMapper<PaymentIndent> {

    /**
     * 支付订单分页列表
     * @param page 分页参数
     * @param queryModel 查询条件
     * @return
     */
    Page<PaymentIndentPageQueryModel> pageQuery(Page<PaymentIndentPageQueryModel> page, @Param("query") PaymentIndentQueryModel queryModel);

    /**
     * 根据订单号查询订单
     * @param orderNo 订单号
     * @return 订单信息
     */
    PaymentIndent getByOrderNo(@Param("orderNo") String orderNo);

    /**
     * 检查订单是否存在
     * @param orderNo 订单号
     * @return 是否存在
     */
    boolean existsByOrderNo(@Param("orderNo") String orderNo);
}